﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Web4Comment.Service;

namespace Web4Comment
{
    public partial class link : System.Web.UI.Page
    {
        SNSService service = new SNSService();

        protected void Page_Load(object sender, EventArgs e)
        {

            if ((String)Session["username"] == null || (String)Session["username"] == "")
            {
                Response.Redirect("./logon.aspx");
            }

            int user_id = (int)Session["user_id"];
            UnlessComment.Model.UserSite userSite;

            if ((userSite = service.isSaveUserSite(1, user_id)) != null)
            {
                span_msn.InnerHtml = "<strong>新浪微博</strong><br/>" + userSite.screen_name + "";
            }
            else
            {
                span_msn.InnerHtml = "未绑定<br/><a href='/sns/snsAuthorize.aspx?sns_id=1'>绑定</a>";
            }

        }

        protected void id_add_friend_Click(object sender, ImageClickEventArgs e)
        {
               Response.Redirect("/sns/snsfriend.aspx");
 
        }

       
    }
}